<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:rg="http://www.ruijie.com.cn/faces/ui"
	xmlns:c="http://java.sun.com/jstl/core"
	template="/layout/contentLayout.xhtml">
	<ui:param name="param_navigationUrl" value="/luyuan/member/navigationMember.jsf" /> 
	
	<ui:define name="road">
		会员分组信息
	</ui:define>
	
	<ui:define name="content">
		<!-- 弧形外观 -->
		<h:form id="memberGroupForm">
		<rg:areaPanel > 
			<rg:areaPanel type="searchPanel" style="margin-top: 10px;">
				<rg:fieldSet column="auto" labelWidth="80px" >
					<rg:inputText id="groupName" label="组名" value="#{memberGroupAction.criteria.groupName}" />
					
					<h:commandButton styleClass="button" value="查询" />
				</rg:fieldSet>
			</rg:areaPanel>
			
			<div style="margin-top: 10px; text-align: right;">
					<button class="button" onclick="UI.instance.showDialog({id:'addMemberGroup', src:'/luyuan/member/addMemberGroup.jsf'});return false;" >
						#{messages.crud_btn_add} 
					</button>
			</div>

			<h:panelGroup id="memberGroupTableGroup">
				<rg:table id="memberGroupTable" value="#{memberGroupAction.tableModel}" var="item" >
					<rg:column property="id" type="checkbox" headerType="checkbox" width="40" />
					<rg:column property="groupName" title="组名" />
					<rg:column property="groupDesc" title="描述" />
					<rg:column cellType="oper" title="操作" width="120">
						<ul class="links">
							<li>
								<h:outputLink value="#" onclick="UI.instance.showDialog({id:'updateMemberGroup', src:'/luyuan/member/updateMemberGroup.jsf?groupId=#{item.id}'});">#{messages.crud_btn_update}</h:outputLink>
							</li>
							<li>
								<a:commandLink value="#{messages.crud_btn_delete}" action="#{memberGroupAction.removeMemberGroup(item)}"
									onclick="if(!confirm('#{messages.crud_del_warn_confirm}')){return;}" reRender="memberGroupTableGroup,globalMessage" />
							</li>
						</ul>
					</rg:column>
				</rg:table>
			</h:panelGroup>
		</rg:areaPanel>
		</h:form>
		<a:form>
			<a:jsFunction name="reRenderMemberGroupTable" reRender="memberGroupTableGroup"/>
		</a:form>
		
	</ui:define>

</ui:composition>